﻿@model List<IQueryable<Orion.Models.NewsArticle>>
@{
    ViewBag.Title = "IRIS - Leitarniðurstöður";
}
@*<script type="text/javascript" src="http://viralpatel.net/blogs/demo/jquery/jquery.shorten.1.0.js"></script>*@
<script src="@Url.Content("~/Scripts/Pagination/jquery.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Pagination/jquery.pagination.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Pagination/jquery.pag.js")" type="text/javascript"></script>
     
<section id="main_content">

    <h1>Leitarniðurstöður fyrir Fréttir</h1>
    @foreach (var na in Model)
    {
        foreach (var t in na)
        {
            if (t.ContentType == 1)
            {   
                    <div class="search">
                        <h2><a href ="/NewsArticle/NewsArticleById/@t.ID">@t.Title</a></h2>
                        <p class="shortenMeAdrarGreinar">@Html.Raw(t.TextBody)</p>
                        <a href="/NewsArticle/NewsArticleById/@t.ID">Lesa Meira af @t.Title >></a>
                    </div>
            }
        }
    }
    <h1>Leitarniðurstöður fyrir Greinar</h1>
    @foreach (var na in Model)
    {
        foreach (var b in na)
        {
            if (b.ContentType == 2)
            {
                <div class="search">
                    <h2><a href="/NewsArticle/NewsArticleById/@b.ID">@b.Title</a></h2>
                    <div class="shortenMeAdrarGreinar">@Html.Raw(b.TextBody).</div>
                    <a href="/NewsArticle/NewsArticleById/@b.ID">Lesa Meira af @b.Title >></a>
                </div>
            }
        }
    }  

     <p><b>@Html.ActionLink("Forsíða", "Index", "Home") | 
            @Html.ActionLink("Ný leit", "Search", "Search")</b></p>          
            
</section>     
           

